<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: flow::async::Op_list Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Public API.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceflow.html">flow</a></li><li class="navelem"><a class="el" href="namespaceflow_1_1async.html">async</a></li><li class="navelem"><a class="el" href="classflow_1_1async_1_1Op__list.html">Op_list</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classflow_1_1async_1_1Op__list-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">flow::async::Op_list Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Simple, immutable <code>vector</code>-like sequence of N opaque <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> objects, usually corresponding to N worker threads, with typically used operations such as <code>[index]</code> and random <code>Op</code> selection.  
 <a href="classflow_1_1async_1_1Op__list.html#details">More...</a></p>

<p><code>#include &lt;op.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for flow::async::Op_list:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1async_1_1Op__list__inherit__graph.svg" width="154" height="107"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for flow::async::Op_list:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1async_1_1Op__list__coll__graph.svg" width="154" height="107"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a9498a8f22aa6d9c6f8a22a65ed1289b0"><td class="memItemLeft" align="right" valign="top"><a id="a9498a8f22aa6d9c6f8a22a65ed1289b0" name="a9498a8f22aa6d9c6f8a22a65ed1289b0"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>Create_op_func</b> = Function&lt; <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949">Op</a>(size_t target_op_idx)&gt;</td></tr>
<tr class="memdesc:a9498a8f22aa6d9c6f8a22a65ed1289b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for function that that takes the target <code>Op</code>-list index and returns new <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> whose copy is suitable as the permanent <code>Op</code> at that index. <br /></td></tr>
<tr class="separator:a9498a8f22aa6d9c6f8a22a65ed1289b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3b9f96cfd38891bb254bf386c6e91df1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1async_1_1Op__list.html#a3b9f96cfd38891bb254bf386c6e91df1">Op_list</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *logger_ptr, size_t n_ops, const <a class="el" href="classflow_1_1async_1_1Op__list.html#a9498a8f22aa6d9c6f8a22a65ed1289b0">Create_op_func</a> &amp;create_op_func)</td></tr>
<tr class="memdesc:a3b9f96cfd38891bb254bf386c6e91df1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Populates the <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> list, which is immutable after this returns.  <a href="classflow_1_1async_1_1Op__list.html#a3b9f96cfd38891bb254bf386c6e91df1">More...</a><br /></td></tr>
<tr class="separator:a3b9f96cfd38891bb254bf386c6e91df1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af57eb8d75c812add02418ef5b1dcafa6"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1async_1_1Op__list.html#af57eb8d75c812add02418ef5b1dcafa6">size</a> () const</td></tr>
<tr class="memdesc:af57eb8d75c812add02418ef5b1dcafa6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> stored in this <a class="el" href="classflow_1_1async_1_1Op__list.html" title="Simple, immutable vector-like sequence of N opaque async::Op objects, usually corresponding to N work...">Op_list</a>.  <a href="classflow_1_1async_1_1Op__list.html#af57eb8d75c812add02418ef5b1dcafa6">More...</a><br /></td></tr>
<tr class="separator:af57eb8d75c812add02418ef5b1dcafa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84e66e05d69e52adf455fede047cf265"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949">Op</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1async_1_1Op__list.html#a84e66e05d69e52adf455fede047cf265">operator[]</a> (size_t idx) const</td></tr>
<tr class="memdesc:a84e66e05d69e52adf455fede047cf265"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns reference to immutable <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> at the given index in <code>[0, <a class="el" href="classflow_1_1async_1_1Op__list.html#af57eb8d75c812add02418ef5b1dcafa6" title="Returns the number of async::Op stored in this Op_list.">size()</a>)</code>.  <a href="classflow_1_1async_1_1Op__list.html#a84e66e05d69e52adf455fede047cf265">More...</a><br /></td></tr>
<tr class="separator:a84e66e05d69e52adf455fede047cf265"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1aff00b9e7b67eb1bc4070533614dfc3"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949">Op</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1async_1_1Op__list.html#a1aff00b9e7b67eb1bc4070533614dfc3">random_op</a> (size_t *chosen_idx=0) const</td></tr>
<tr class="memdesc:a1aff00b9e7b67eb1bc4070533614dfc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>(*this)[R]</code>, where we randomly select R as if by <a class="el" href="classflow_1_1async_1_1Op__list.html#ad0929efa574298c96c13845a6e020d7d" title="Returns a randomly selected index from range [O, size()).">random_idx()</a> and communicate it to the caller via optional out-arg.  <a href="classflow_1_1async_1_1Op__list.html#a1aff00b9e7b67eb1bc4070533614dfc3">More...</a><br /></td></tr>
<tr class="separator:a1aff00b9e7b67eb1bc4070533614dfc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0929efa574298c96c13845a6e020d7d"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1async_1_1Op__list.html#ad0929efa574298c96c13845a6e020d7d">random_idx</a> () const</td></tr>
<tr class="memdesc:ad0929efa574298c96c13845a6e020d7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a randomly selected index from range [O, <a class="el" href="classflow_1_1async_1_1Op__list.html#af57eb8d75c812add02418ef5b1dcafa6" title="Returns the number of async::Op stored in this Op_list.">size()</a>).  <a href="classflow_1_1async_1_1Op__list.html#ad0929efa574298c96c13845a6e020d7d">More...</a><br /></td></tr>
<tr class="separator:ad0929efa574298c96c13845a6e020d7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70726f4c547b813687419f3c7cc9f977"><td class="memItemLeft" align="right" valign="top">const std::vector&lt; <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949">Op</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1async_1_1Op__list.html#a70726f4c547b813687419f3c7cc9f977">ops_sequence</a> () const</td></tr>
<tr class="memdesc:a70726f4c547b813687419f3c7cc9f977"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns reference to immutable internally stored sequence of <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> in order consistent with other methods of this class.  <a href="classflow_1_1async_1_1Op__list.html#a70726f4c547b813687419f3c7cc9f977">More...</a><br /></td></tr>
<tr class="separator:a70726f4c547b813687419f3c7cc9f977"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classflow_1_1log_1_1Log__context"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classflow_1_1log_1_1Log__context')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classflow_1_1log_1_1Log__context.html">flow::log::Log_context</a></td></tr>
<tr class="memitem:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *logger=0)</td></tr>
<tr class="memdesc:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="classflow_1_1log_1_1Log__context.html" title="Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...">Log_context</a> by storing the given pointer to a <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> and a null <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a>.  <a href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">More...</a><br /></td></tr>
<tr class="separator:ae7100d2dd130d8f130e3e64fdb1f4fd9 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memTemplParams" colspan="2">template&lt;typename Component_payload &gt; </td></tr>
<tr class="memitem:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#af1ac7f30ab442c3c6aa6079335df6c9a">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *logger, Component_payload component_payload)</td></tr>
<tr class="memdesc:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs <a class="el" href="classflow_1_1log_1_1Log__context.html" title="Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...">Log_context</a> by storing the given pointer to a <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> and a new <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> storing the specified generically typed payload (an <code>enum</code> value).  <a href="classflow_1_1log_1_1Log__context.html#af1ac7f30ab442c3c6aa6079335df6c9a">More...</a><br /></td></tr>
<tr class="separator:af1ac7f30ab442c3c6aa6079335df6c9a inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a5c57a7f44959a01ca9a1c948a6686cc0">Log_context</a> (const <a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;src)</td></tr>
<tr class="memdesc:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor that stores equal <code>Logger*</code> and <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> values as the source.  <a href="classflow_1_1log_1_1Log__context.html#a5c57a7f44959a01ca9a1c948a6686cc0">More...</a><br /></td></tr>
<tr class="separator:a5c57a7f44959a01ca9a1c948a6686cc0 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a3d4e624833d96bdafa1485ffff472509">Log_context</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&amp;src)</td></tr>
<tr class="memdesc:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move constructor that makes this equal to <code>src</code>, while the latter becomes as-if default-constructed.  <a href="classflow_1_1log_1_1Log__context.html#a3d4e624833d96bdafa1485ffff472509">More...</a><br /></td></tr>
<tr class="separator:a3d4e624833d96bdafa1485ffff472509 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">operator=</a> (const <a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;src)</td></tr>
<tr class="memdesc:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator that behaves similarly to the copy constructor.  <a href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">More...</a><br /></td></tr>
<tr class="separator:a5d628315d5a93908d47a281980d3113e inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308">operator=</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;&amp;src)</td></tr>
<tr class="memdesc:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move assignment operator that behaves similarly to the move constructor.  <a href="classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308">More...</a><br /></td></tr>
<tr class="separator:aae857197aecba8606c32296bc7bec308 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">swap</a> (<a class="el" href="classflow_1_1log_1_1Log__context.html">Log_context</a> &amp;other)</td></tr>
<tr class="memdesc:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swaps <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> pointers and <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> objects held by <code>*this</code> and <code>other</code>.  <a href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">More...</a><br /></td></tr>
<tr class="separator:aa6bb8e4250586425631ef80063caf155 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classflow_1_1log_1_1Logger.html">Logger</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">get_logger</a> () const</td></tr>
<tr class="memdesc:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the stored <a class="el" href="classflow_1_1log_1_1Logger.html" title="Interface that the user should implement, passing the implementing Logger into logging classes (Flow&#39;...">Logger</a> pointer, particularly as many <code>FLOW_LOG_*()</code> macros expect.  <a href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">More...</a><br /></td></tr>
<tr class="separator:af4db395042b065b00398cd59845dcb4d inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classflow_1_1log_1_1Component.html">Component</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">get_log_component</a> () const</td></tr>
<tr class="memdesc:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns reference to the stored <a class="el" href="classflow_1_1log_1_1Component.html" title="A light-weight class, each object storing a component payload encoding an enum value from enum type o...">Component</a> object, particularly as many <code>FLOW_LOG_*()</code> macros expect.  <a href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">More...</a><br /></td></tr>
<tr class="separator:a8a5fef42dc2cedf3c0d1a6e83beb2948 inherit pub_methods_classflow_1_1log_1_1Log__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Simple, immutable <code>vector</code>-like sequence of N opaque <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> objects, usually corresponding to N worker threads, with typically used operations such as <code>[index]</code> and random <code>Op</code> selection. </p>
<h3>Thread safety</h3>
<p >The object is immutable after construction; therefore each <code>*this</code> is safe for concurrent <a class="el" href="classflow_1_1async_1_1Op__list.html" title="Simple, immutable vector-like sequence of N opaque async::Op objects, usually corresponding to N work...">Op_list</a> method calls. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a3b9f96cfd38891bb254bf386c6e91df1" name="a3b9f96cfd38891bb254bf386c6e91df1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b9f96cfd38891bb254bf386c6e91df1">&#9670;&nbsp;</a></span>Op_list()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">flow::async::Op_list::Op_list </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *&#160;</td>
          <td class="paramname"><em>logger_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n_ops</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classflow_1_1async_1_1Op__list.html#a9498a8f22aa6d9c6f8a22a65ed1289b0">Create_op_func</a> &amp;&#160;</td>
          <td class="paramname"><em>create_op_func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Populates the <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> list, which is immutable after this returns. </p>
<p >Caller may permanently store <code>*this</code> with a <code>const</code> qualifier.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">logger_ptr</td><td>Logger to which to log subsequently. </td></tr>
    <tr><td class="paramname">n_ops</td><td>How many <code>Op</code>s will we permanently store? The index range will therefore be <code>[0, n_ops)</code> or <code>[0, n_ops - 1)</code>. Must be at least 1, or <code>assert()</code> trips. </td></tr>
    <tr><td class="paramname">create_op_func</td><td>Caller's factory function that will generate the actual <code>n_ops</code> <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> objects to store. The caller shall populate each <code>Op</code> it returns with a (small) value of whatever arbitrary type it wants. <code>create_op_func()</code> shall be called, in order, <code>n_ops</code> times synchronously, with index argument ranging fully through <code>[0, n_ops)</code>. A copy of <code>Op create_op_func(idx)</code> is saved, and subsequently <code>(*this)[idx]</code> will return a reference to this permanently stored copy. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a84e66e05d69e52adf455fede047cf265" name="a84e66e05d69e52adf455fede047cf265"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84e66e05d69e52adf455fede047cf265">&#9670;&nbsp;</a></span>operator[]()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949">Op</a> &amp; flow::async::Op_list::operator[] </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns reference to immutable <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> at the given index in <code>[0, <a class="el" href="classflow_1_1async_1_1Op__list.html#af57eb8d75c812add02418ef5b1dcafa6" title="Returns the number of async::Op stored in this Op_list.">size()</a>)</code>. </p>
<p >It is just like the <code>const</code> variety of <code>"vector&lt;Op&gt;::operator[]"</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">idx</td><td>Value in <code>[0, <a class="el" href="classflow_1_1async_1_1Op__list.html#af57eb8d75c812add02418ef5b1dcafa6" title="Returns the number of async::Op stored in this Op_list.">size()</a>)</code>. <code>assert()</code> trips if out of range. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>See above. Note the address stored in the returned <em>reference</em> is valid until destructor runs; hence it's not necessary (though cheap) to copy the <code>Op</code>. </dd></dl>

</div>
</div>
<a id="a70726f4c547b813687419f3c7cc9f977" name="a70726f4c547b813687419f3c7cc9f977"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70726f4c547b813687419f3c7cc9f977">&#9670;&nbsp;</a></span>ops_sequence()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::vector&lt; <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949">Op</a> &gt; &amp; flow::async::Op_list::ops_sequence </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns reference to immutable internally stored sequence of <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> in order consistent with other methods of this class. </p>
<dl class="section return"><dt>Returns</dt><dd>See above. </dd></dl>

</div>
</div>
<a id="ad0929efa574298c96c13845a6e020d7d" name="ad0929efa574298c96c13845a6e020d7d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0929efa574298c96c13845a6e020d7d">&#9670;&nbsp;</a></span>random_idx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t flow::async::Op_list::random_idx </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a randomly selected index from range [O, <a class="el" href="classflow_1_1async_1_1Op__list.html#af57eb8d75c812add02418ef5b1dcafa6" title="Returns the number of async::Op stored in this Op_list.">size()</a>). </p>
<dl class="section return"><dt>Returns</dt><dd>See above. </dd></dl>

</div>
</div>
<a id="a1aff00b9e7b67eb1bc4070533614dfc3" name="a1aff00b9e7b67eb1bc4070533614dfc3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1aff00b9e7b67eb1bc4070533614dfc3">&#9670;&nbsp;</a></span>random_op()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949">Op</a> &amp; flow::async::Op_list::random_op </td>
          <td>(</td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>chosen_idx</em> = <code>0</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns <code>(*this)[R]</code>, where we randomly select R as if by <a class="el" href="classflow_1_1async_1_1Op__list.html#ad0929efa574298c96c13845a6e020d7d" title="Returns a randomly selected index from range [O, size()).">random_idx()</a> and communicate it to the caller via optional out-arg. </p>
<p >Logs a TRACE message.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">chosen_idx</td><td>If not null, then a post-condition is that <code>*chosen_idx</code> has been set to the index of the returned <code>Op</code>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>See above. Note the address stored in the returned <em>reference</em> is valid until destructor runs; hence it's not necessary (though cheap) to copy the <code>Op</code>. </dd></dl>

</div>
</div>
<a id="af57eb8d75c812add02418ef5b1dcafa6" name="af57eb8d75c812add02418ef5b1dcafa6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af57eb8d75c812add02418ef5b1dcafa6">&#9670;&nbsp;</a></span>size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t flow::async::Op_list::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of <a class="el" href="namespaceflow_1_1async.html#a024042c64b7dc544a7a5587afa4b1949" title="An object of this opaque type represents a collection of 1 or more async::Task, past or future,...">async::Op</a> stored in this <a class="el" href="classflow_1_1async_1_1Op__list.html" title="Simple, immutable vector-like sequence of N opaque async::Op objects, usually corresponding to N work...">Op_list</a>. </p>
<p >The returned value is always the same. </p><dl class="section return"><dt>Returns</dt><dd>See above. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>async/<a class="el" href="op_8hpp.html">op.hpp</a></li>
<li>async/<a class="el" href="op_8cpp.html">op.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:32 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
